/*************************************************************************
 * SceneML, Copyright (C) 2007, 2008  J.D. Yamokoski
 * All rights reserved.
 * Email: yamokosk at gmail dot com
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of the License,
 * or (at your option) any later version. The text of the GNU Lesser General
 * Public License is included with this library in the file LICENSE.TXT.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE. See the file LICENSE.TXT for
 * more details.
 *
 *************************************************************************/
/*
 * Serialize.h
 *
 *  Created on: Sep 15, 2008
 *      Author: yamokosk
 */

#ifndef SERIALIZE_H_
#define SERIALIZE_H_

#include <string>

namespace TinySG
{

class Serializable
{
protected:
	virtual std::string getClassName() = 0;
	virtual void getAttributes(PropertyCollectionPtr& ptr) = 0;
	virtual void getParameters(PropertyCollectionPtr& ptr) = 0;
};

class ObjectFactory
{
protected:
	virtual Serializable* createObjectImpl( const PropertyCollectionPtr& pc ) = 0;
public:
	Serializable* createObject( const PropertyCollectionPtr& pc )
	{
		return this->createObjectImpl( pc );
	}
	virtual std::string getClassName() = 0;
};

}

#endif /* SERIALIZE_H_ */
